package com.itheima.timer;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @author Anomaly
 * @date 2023/2/10 23:58
 */
public class TimerDemo {
    public static void main(String[] args) {
        new Timer().schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName() + "执行了");
            }
        }, 3000, 2000);
    }
}
